﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="newuser.aspx.cs" Inherits="Mocola.Net.Web.newuser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>CsLand Ams v1.0 - 中新置地档案管理系统</title>
    <meta name="description" content="CsLand Ams v1.0 - 中新置地档案管理系统" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />

    <link rel="stylesheet" href="css/content.css" type="text/css" />
    <link rel="stylesheet" href="css/ui.css" type="text/css" />
    <link rel="stylesheet" href="css/sys.css" type="text/css" />
    <link rel="stylesheet" href="css/table.css" type="text/css" />
    <link rel="stylesheet" href="scripts/formcheck/theme/classic/formcheck.css" type="text/css" media="screen" />
    
    <!--[if IE]>
	    <script type="text/javascript" src="scripts/excanvas-compressed.js"></script>	
	    <style type="text/css"> html{ height: 100%; overflow: auto; } </style>	
    <![endif]-->
    	
    <script type="text/javascript" src="scripts/mootools-1.2-core.js"></script>
    <script type="text/javascript" src="scripts/mootools-1.2-more.js"></script>	
    <script type="text/javascript" src="scripts/mocha.js"></script>
    <script type="text/javascript" src="scripts/mocola-funs.js"></script>
    <script type="text/javascript" src="scripts/formcheck/lang/cn.js"> </script>
    <script type="text/javascript" src="scripts/formcheck/formcheck.js"> </script>
</head>
<body>
    <form id="frmNewUser" runat="server">
    <div style="margin:5px">
    <table class="mytable" cellspacing="0" summary="菜单栏" style="width:100%">
      <tr>
        <th scope="row" class="specalt">
            <asp:Button ID="btnSave2" runat="server" Text="保存用户" CssClass="btnzc" 
                Width="100" onclick="btnSave_Click" CommandName="Save1" />
            <input id="btnBack" type="button" value="返回列表" class="btnzc" style="width:100px" onclick="back()"/>
        </th>
      </tr>
    </table>
    <table class="mytable" cellspacing="0" summary="新增用户表单" style="width:100%;margin-top:5px;">
      <tr>
        <th scope="row" class="spec">
            <div class="title1">填写用户资料：</div>
            
            <div class="frmline1">
                <label class="label2">1. 姓　名：</label>
                <asp:TextBox ID="txtXingMing" runat="server" Cssclass="inputbox validate['required','length[1,4]']"></asp:TextBox>
            </div>
            
            <div class="frmline1">
                <label class="label2">2. 登录名：</label>
                <asp:TextBox ID="txtDengLuMing" runat="server" Cssclass="inputbox validate['required','length[2,10]']"></asp:TextBox>
            </div>
            
            <div class="frmline1">
                <label class="label2">3. 密　码：</label> 
                <asp:TextBox ID="txtMiMa" runat="server" Cssclass="inputbox validate['required','length[6,-1]','alphanum']" TextMode="Password" ></asp:TextBox>
            </div>
            
            <div class="frmline1">
                <label class="label2">4. 确认密码：</label> 
                <asp:TextBox ID="txtQueRenMima" runat="server" Cssclass="inputbox validate['confirm[txtMiMa]']" TextMode="Password"></asp:TextBox>
            </div>
            
            <div class="frmline1">
                <label class="label2">5. 性　别：</label> 
                <asp:DropDownList ID="ddlSex" runat="server" Width="100px">
                    <asp:ListItem Value="0">男</asp:ListItem>
                    <asp:ListItem Value="1">女</asp:ListItem>
                </asp:DropDownList>
            </div>
            
            <div class="frmline1">
                <label class="label2">6. 电　话：</label>
                <asp:TextBox ID="txtDianHua" runat="server" Cssclass="inputbox validate['diag']"></asp:TextBox>
            </div>
            
            <div class="frmline1">
                <label class="label2">7. 电子邮件：</label>
                <asp:TextBox ID="txtEmail" runat="server" Cssclass="inputbox validate['required','email']"></asp:TextBox>
            </div>
            
            <div class="frmline1">
                <label class="label2">8. 所属部门：</label>

                <asp:CheckBoxList ID="cblDepartment" runat="server" DataTextField="Name" 
                    DataValueField="ID" RepeatColumns="4" RepeatDirection="Horizontal">
                </asp:CheckBoxList>
            </div>
            
            <div class="frmline1">
                <label class="label2">9. 所属角色：</label>
                <asp:DropDownList ID="ddlRoles" runat="server" DataTextField="RoleName" 
                    DataValueField="ID" Width="100px">
                </asp:DropDownList>
            </div>
            
            <div class="frmline1">
                <label class="label2">10. 状态：</label>
                <asp:DropDownList ID="ddlStatus" runat="server" Width="100px" >
                    <asp:ListItem Value="0">激活</asp:ListItem>
                    <asp:ListItem Value="1">锁定</asp:ListItem>
                </asp:DropDownList>
            </div>
        </th>
      </tr>
    </table>
    <table class="mytable" cellspacing="0" summary="菜单栏" style="width:100%;margin-top:5px;">
      <tr>
        <th scope="row" class="specalt">
            <asp:Button ID="btnSave" runat="server" Text="保存用户" CssClass="btnzc" 
                Width="100" onclick="btnSave_Click" />
            <input id="Button1" type="button" value="返回列表" class="btnzc" style="width:100px" onclick="back()"/>
        </th>
      </tr>
    </table>
    </div>
    </form>
    <script type="text/javascript">
        var fchkNewUser = null;

        function back() {
            location.replace('userlist.aspx');
        }

        window.addEvent('domready', function() {
            fchkNewUser = new FormCheck('frmNewUser');
        });

        function submitForm() {
            var reqValues = new Request.HTML({ url: RqUrl,
                onSuccess: function(html) {
                    window.parent.$('mainPanel_iframe').src = window.parent.$('mainPanel_iframe').src;
                },
                onFailure: function() {
                    window.parent.MochaUI.notification('表单提交失败！'); ;
                }
            }).post($('frmNewMap'));
        }
    </script>
</body>
</html>
